//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.indexes.accumulategoodslist.support;

import com.google.common.collect.Lists;
import com.nebutown.commonunits.dataface.definitions.TimeInterval;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.util.List;

public class GoodsSearchBean implements PickableBean {
    public static final String FN_GOODSNAME = "goodsName";
    public static final String FN_GOODSID = "goodsId";
    public static final String FN_USESHOPNAME = "useShopName";
    public static final String FN_CREATETIME = "createTime";
    public static final String FN_UPTIME = "upTime";
    public static final String FN_PAGE = "page";
    public static final String FN_CATEGORY = "category";
    public static final String FN_STATE = "state";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"goodsName", "goodsId", "useShopName", "createTime", "upTime", "page", "category", "state"});
    private String goodsName;
    private String goodsId;
    private String useShopName;
    private TimeInterval createTime;
    private TimeInterval upTime;
    private Long page;
    private String category;
    private String state;

    public GoodsSearchBean(String goodsName, String goodsId, String useShopName, TimeInterval createTime, TimeInterval upTime, Long page, String category, String state) {
        this.setGoodsName(goodsName);
        this.setGoodsId(goodsId);
        this.setUseShopName(useShopName);
        this.setCreateTime(createTime);
        this.setUpTime(upTime);
        this.setPage(page);
        this.setCategory(category);
        this.setState(state);
    }

    public GoodsSearchBean() {
    }

    public GoodsSearchBean duplicate() {
        GoodsSearchBean result = new GoodsSearchBean();
        result.goodsName = this.goodsName;
        result.goodsId = this.goodsId;
        result.useShopName = this.useShopName;
        result.createTime = this.createTime == null ? null : this.createTime.duplicate();
        result.upTime = this.upTime == null ? null : this.upTime.duplicate();
        result.page = this.page;
        result.category = this.category;
        result.state = this.state;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public String getGoodsName() {
        return this.goodsName;
    }

    public void setGoodsName(String value) {
        this.goodsName = value;
    }

    public GoodsSearchBean withGoodsName(String value) {
        this.setGoodsName(value);
        return this;
    }

    public GoodsSearchBean withGoodsName(String value, String defaultValue) {
        this.setGoodsName(value == null ? defaultValue : value);
        return this;
    }

    public String getGoodsId() {
        return this.goodsId;
    }

    public void setGoodsId(String value) {
        this.goodsId = value;
    }

    public GoodsSearchBean withGoodsId(String value) {
        this.setGoodsId(value);
        return this;
    }

    public GoodsSearchBean withGoodsId(String value, String defaultValue) {
        this.setGoodsId(value == null ? defaultValue : value);
        return this;
    }

    public String getUseShopName() {
        return this.useShopName;
    }

    public void setUseShopName(String value) {
        this.useShopName = value;
    }

    public GoodsSearchBean withUseShopName(String value) {
        this.setUseShopName(value);
        return this;
    }

    public GoodsSearchBean withUseShopName(String value, String defaultValue) {
        this.setUseShopName(value == null ? defaultValue : value);
        return this;
    }

    public TimeInterval getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(TimeInterval value) {
        this.createTime = value;
    }

    public GoodsSearchBean withCreateTime(TimeInterval value) {
        this.setCreateTime(value);
        return this;
    }

    public GoodsSearchBean withCreateTime(TimeInterval value, TimeInterval defaultValue) {
        this.setCreateTime(value == null ? defaultValue : value);
        return this;
    }

    public TimeInterval getUpTime() {
        return this.upTime;
    }

    public void setUpTime(TimeInterval value) {
        this.upTime = value;
    }

    public GoodsSearchBean withUpTime(TimeInterval value) {
        this.setUpTime(value);
        return this;
    }

    public GoodsSearchBean withUpTime(TimeInterval value, TimeInterval defaultValue) {
        this.setUpTime(value == null ? defaultValue : value);
        return this;
    }

    public Long getPage() {
        return this.page;
    }

    public void setPage(Long value) {
        this.page = value;
    }

    public GoodsSearchBean withPage(Long value) {
        this.setPage(value);
        return this;
    }

    public GoodsSearchBean withPage(Long value, Long defaultValue) {
        this.setPage(value == null ? defaultValue : value);
        return this;
    }

    public String getCategory() {
        return this.category;
    }

    public void setCategory(String value) {
        this.category = value;
    }

    public GoodsSearchBean withCategory(String value) {
        this.setCategory(value);
        return this;
    }

    public GoodsSearchBean withCategory(String value, String defaultValue) {
        this.setCategory(value == null ? defaultValue : value);
        return this;
    }

    public String getState() {
        return this.state;
    }

    public void setState(String value) {
        this.state = value;
    }

    public GoodsSearchBean withState(String value) {
        this.setState(value);
        return this;
    }

    public GoodsSearchBean withState(String value, String defaultValue) {
        this.setState(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -839315448:
                if (name.equals("upTime")) {
                    var3 = 4;
                }
                break;
            case 3433103:
                if (name.equals("page")) {
                    var3 = 5;
                }
                break;
            case 50511102:
                if (name.equals("category")) {
                    var3 = 6;
                }
                break;
            case 109757585:
                if (name.equals("state")) {
                    var3 = 7;
                }
                break;
            case 207037201:
                if (name.equals("goodsId")) {
                    var3 = 1;
                }
                break;
            case 935727432:
                if (name.equals("useShopName")) {
                    var3 = 2;
                }
                break;
            case 1369213417:
                if (name.equals("createTime")) {
                    var3 = 3;
                }
                break;
            case 1394404097:
                if (name.equals("goodsName")) {
                    var3 = 0;
                }
        }

        switch(var3) {
            case 0:
                return this.getGoodsName();
            case 1:
                return this.getGoodsId();
            case 2:
                return this.getUseShopName();
            case 3:
                return this.getCreateTime();
            case 4:
                return this.getUpTime();
            case 5:
                return this.getPage();
            case 6:
                return this.getCategory();
            case 7:
                return this.getState();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -839315448:
                if (name.equals("upTime")) {
                    var4 = 4;
                }
                break;
            case 3433103:
                if (name.equals("page")) {
                    var4 = 5;
                }
                break;
            case 50511102:
                if (name.equals("category")) {
                    var4 = 6;
                }
                break;
            case 109757585:
                if (name.equals("state")) {
                    var4 = 7;
                }
                break;
            case 207037201:
                if (name.equals("goodsId")) {
                    var4 = 1;
                }
                break;
            case 935727432:
                if (name.equals("useShopName")) {
                    var4 = 2;
                }
                break;
            case 1369213417:
                if (name.equals("createTime")) {
                    var4 = 3;
                }
                break;
            case 1394404097:
                if (name.equals("goodsName")) {
                    var4 = 0;
                }
        }

        switch(var4) {
            case 0:
                this.setGoodsName((String)value);
                return;
            case 1:
                this.setGoodsId((String)value);
                return;
            case 2:
                this.setUseShopName((String)value);
                return;
            case 3:
                this.setCreateTime((TimeInterval)value);
                return;
            case 4:
                this.setUpTime((TimeInterval)value);
                return;
            case 5:
                this.setPage((Long)value);
                return;
            case 6:
                this.setCategory((String)value);
                return;
            case 7:
                this.setState((String)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof GoodsSearchBean) ? false : this.signature().equals(((GoodsSearchBean)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean GoodsSearchBean has no signature defined, no hash code or equals possible.");
    }
}
